﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EmbeddedSharp.Core;

namespace Zove.Scripting.Guikit {

    public class OpenFileDialogNode : FuncNode {
        public OpenFileDialogNode()
            : base() {
            base.Value = "OpenFileDialog";
        }

        public override object Evaluate() {
            OpenFileDialog d = new OpenFileDialog();
            if (d.ShowDialog() == DialogResult.OK) {
                return d.FileName;
            }

            return string.Empty;
        }
    }
}
